<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style>
        h4 {
            color: red;
        }

        div {
            width: 100px;
            height: 100px;
            background-color: red;
        }

        #div {
            border: 5px solid black;
        }

        #div:hover {
            background-color: yellow;
        }

        #div, h4 {
            background-color: yellow;
        }

        .error {
            background-color: red;
        }

        .success {
            background-color: green;
        }

        .msg {
            width: 20px;
            font-size: 12px;
            color: white;
            border-radius: 3px;
        }

        * {
            font-style: italic;
        }

        a:link {
            color: gray;
        }

        a:visited {
            color: green;
        }

        a:hover {
            color: orange;
        }

        a:active {
            color: red;
        }

        [type="text"] {
            background-color: blueviolet;
        }
        div span{
            background-color: green;
        }
    </style>
</head>
<body>
<h4>我是标题</h4>
<p>我是段落</p>
<a href="#">我是超链接</a>
<h4>我是标题2</h4>
<div>我是div1</div>
<div id="div">我是div2</div>
<div>我是div3</div>
<hr>
<span class="msg error">用户名被占用</span>
<span class="msg error">两次密码不一致</span>
<br>
<span class="msg success">手机号格式正确</span>
<span class="msg success">邮箱格式正确</span>
<hr>
<a href="http://www.baidu.com">百度首页</a>
<a href="#">我是超链接1</a>
<a href="#">我是超链接2</a>
用户名:<input type="text">
密码:<input type="password">
<hr>
<div id="d1">
    <span>1</span>
    <div>
        <span>2</span>
        <b>测试文字</b>
    </div>
    <span>3</span>
</div>
</body>
</html>